﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RPGX;
using RPGX.Game;

namespace RPGXEngine.Tests.Unit.Scripting.SystemFunctions
{
    [TestClass]
    public class SystemFunction_GameStateSet : SystemFunctionTestBase
    {
        #region Test Methods

        [TestCleanup]
        public void Cleanup()
        {
            this.Shutdown();
        }

        [TestMethod]
        public void Run_GameStateInGame_GameStateSetToInGame()
        {
            this.Load();

            Game1.Instance.ScriptManager.RunCode(@"GameStateSet(""InGame"");");

            GameState expectedGameState = GameState.InGame;
            Assert.AreEqual(expectedGameState, Game1.Instance.GameState);
        }

        #endregion
    }
}
